<template>
  <div class="bg-c-fff mb70 container">
    <h2 class="box-title rel">企业资质审核 > 详情</h2>
    <ul>
      <li>
        <span>企业名称：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="companyName">
      </li>
      <li>
        <span>所属行业：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="industry">
      </li>
      <li>
        <span>联系电话：</span>
        <input type="number" readonly="readonly" class="input-css input-w1" v-model="companyPhone">
      </li>
      <li>
        <span>办公地址：</span>
        <input type="text" readonly="readonly" name="" class="input-css input-w1" v-model="address">
      </li>
      <li>
        <span>企业邮箱：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="mail">
      </li>
      <li>
        <span>企业官方地址：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="website">
      </li>
      <li>
        <span>负责人姓名：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="name">
      </li>
      <li>
        <span>负责人电话：</span>
        <input type="text" readonly="readonly" class="input-css input-w1" v-model="bossPhone">
      </li>
      <li>
        <span>营业执照：</span>
        <a :href="yyzzImg" target="_blank"><img class="vt" :src="yyzzImg"></a>
      </li>
      <li class="idImg">
        <span>法定代表人身份证：</span>
        <a :href="fIDImg1" target="_blank"><img class="vt" :src="fIDImg1"></a>
        <a :href="fIDImg2" target="_blank"><img class="vt" :src="fIDImg2"></a>
      </li>
      <li>
        <span>法定代表人身份证明书：</span>
        <a :href="corporationTestimonial" target="_blank">
          <button class="blue-button xl-btn-css">下载</button>
        </a>
      </li>
      <li>
        <span>授权委托书：</span>
        <a :href="proxyBook" target="_blank">
          <button class="blue-button xl-btn-css">下载</button>
        </a>
      </li>
      <li class="idImg">
        <span>受委托人身份证：</span>
        <a :href="wIDImg1" target="_blank"><img class="vt" :src="wIDImg1"></a>
        <a :href="wIDImg2" target="_blank"><img class="vt" :src="wIDImg2"></a>
      </li>
    </ul>
  </div>
</template>
<script type="text/javascript">
export default {
  data() {
    return {
      companyName: '',
      industry: '',
      companyPhone: '',
      address: '',
      mail: '',
      website: '',
      name: '',
      bossPhone: '',
      yyzzImg: '',
      fIDImg1: '',
      fIDImg2: '',
      wIDImg1: '',
      wIDImg2: '',
      corporationTestimonial: '',
      proxyBook: ''
    }
  },
  mounted() {
    this.getData(this.$route.query.id)
  },
  methods: {
    getData(id) {
      this.$http.get('/memberBusniess/query/busniessInfo/byId', {
        params: {
          id: id
        }
      }).then(data => {
        if (data.data.httpCode === 200) {
          let result = data.data.data.memberBusniess
          this.companyName = result.account
          this.industry = result.industryOne
          this.companyPhone = result.phone
          this.address = result.address
          this.mail = result.email
          this.website = result.officialWebsiteAddress
          this.name = result.dutyName
          this.bossPhone = result.dutyPhone
          console.log(this.bossPhone)
          this.yyzzImg = result.businessLicence
          this.fIDImg1 = result.corporationCardFront
          this.fIDImg2 = result.corporationCardBack
          this.wIDImg1 = result.proxyPersonCardFront
          this.wIDImg2 = result.proxyPersonCardBack
          this.corporationTestimonial = result.corporationTestimonial
          this.proxyBook = result.proxyBook
        } else {
          this.$toasted.show(data.data.msg)
        }
      }).catch(err => {
        console.log(err)
        this.$toasted.show('网络出错')
      })
    }
  }
}

</script>
<style type="text/css" scoped>
.container {
  margin-top: 20px;
}

ul {
  padding: 0 0 70px 190px;
}

ul li {
  padding: 10px 0;
}

ul li span {
  width: 194px;
  display: inline-block;
  text-align: right;
  color: #666666;
  margin-right: 20px;
}

img {
  height: 120px;
  display: inline-block;
}

</style>
